]> dgit.raspbian.org Git - gnome-shell.git/commit
main: call gjs_dumpstack on aborts and traps and optionally on segfaults
authorMarco Trevisan (Treviño) <mail@3v1n0.net>
Fri, 20 Oct 2017 10:41:59 +0000 (05:41 -0500)
committerMarco Trevisan (Treviño) <mail@3v1n0.net>
Mon, 23 Oct 2017 10:05:51 +0000 (05:05 -0500)
commitf90b225eaa99423b39d00a7fe49864e1815de90d
tree40abfc81d1a176480d885d1eb018ba5bd284470c
parentf9569912df0e05a101375f04f4bb243f2c778a83
main: call gjs_dumpstack on aborts and traps and optionally on segfaults

In order to debug issues triggered by JS code we might need to
see the stack of it, this is not normally visible in static stack traces,
thus we need to call gjs_dumpstack () before dying the process.

Intercepting signals SIGABRT, SIGTRAP (needed for catching fatal glib
errors) SIGFPE and SIGIOT by default, while introducing a new
'backtrace-segfaults' flag for the SHELL_DEBUG environment variable to
do the same on SIGSEGV and SIGBUS (this is a precaution to avoid that we
corrupt the stack for automatic errors trackers).

In any case after dumping the stack we raise the signal again, in order
to make the system aware of it.

https://bugzilla.gnome.org/show_bug.cgi?id=789237
src/main.c